1. Field of the Invention
The invention relates generally to storage systems utilizing cache memory and more specifically relates to methods and structures within the storage system for analyzing cache memory utilization to determine a desired cache memory size within the storage system for improved performance.
2. Discussion of Related Art
It is well known for storage systems to utilize cache memory. Cache memory is used in storage systems to improve the speed of processing I/O requests. Data written to the storage system may be stored in the cache memory so that subsequent read requests for the same data may be completed using the data in cache memory rather than the slower access typical of accessing data stored on storage devices (e.g., disk drives) of the storage system.
Cache memory for these storage subsystems is typically based on random access semiconductor memory (RAM) technology. Some storage systems use other tiers of data storage in order to optimize systems for performance or cost. For example, solid state devices (SSD) based on flash memory technology can be used as a medium to store information that can be accessed much faster than information stored on typical rotating magnetic or optical hard disk drives (HDD). The cache management routines typically contain mechanisms to track use of data. These mechanisms typically include a list of data blocks accessed, kept in least recently used (LRU) order for determining which blocks of data should be stored in the higher speed cache memory.
One problem with caching approaches to improve performance in storage system occurs when the amount of data that is frequently accessed through the storage system is larger than the amount of data that can fit into the higher performance cache or other tiered memories. When this happens, often the mechanisms that improve performance with smaller data sets begin to degrade performance due to “thrashing” of data into and out of the higher performance cache memory.
It is difficult to determine a priori the optimal size of a cache memory that will be beneficial to a specific workload on a specific storage system. Many storage systems provide several cache size options which generally must be tried to find out if they help in specific situations. Sometimes the cache memory size can be adjusted by operation of the storage system by re-allocating a memory subsystem to use more or less of the available memory for the caching functions. In other systems, the size of the cache may be determined at time of manufacture of the storage system but may be upgraded by field personnel or by end users.
The collection of data that is frequently accessed and thus may benefit from being stored in cache memory may be referred to as the “working set”. If the working set size exceeds the present size of the cache memory, undesirable thrashing may take place wherein the storage system is frequently swapping data in and out of the cache memory. In such a case, an increased cache size may be desired to reduce the thrashing. However, as noted above, determining this size a priori for a particular storage system application is a difficult problem.
Thus, it is an ongoing challenge to efficiently determine an optimal size for cache memory in a storage system.